Предположим, вы решили разработать чат-бота. В нем конечно же будет с десяток самых крутых и полезных функций, может быть даже в нем будет модные нынче нейросети.
И конечно же не обошлось без приветствия, вы специально заготовили несколько различных вариантов в файле text.txt:
Чтобы вывести это на экран, может помочь функция getline из модуля linecache. В чем главное отличие этой функции от обычного метода чтения из файла? Функция getline кеширует все строчки файла в списке, так что следующие вызовы get_answer отработают моментально.
Предположим, вы решили разработать чат-бота. В нем конечно же будет с десяток самых крутых и полезных функций, может быть даже в нем будет модные нынче нейросети.
И конечно же не обошлось без приветствия, вы специально заготовили несколько различных вариантов в файле text.txt:
Чтобы вывести это на экран, может помочь функция getline из модуля linecache. В чем главное отличие этой функции от обычного метода чтения из файла? Функция getline кеширует все строчки файла в списке, так что следующие вызовы get_answer отработают моментально.
At a time when the Indian stock market is peaking and has rallied immensely compared to global markets, there are companies that have not performed in the last 10 years. These are definitely a minor portion of the market considering there are hundreds of stocks that have turned multibagger since 2020. What went wrong with these stocks? Reasons vary from corporate governance, sectoral weakness, company specific and so on. But the more important question is, are these stocks worth buying?
The SSE was the first modern stock exchange to open in China, with trading commencing in 1990. It has now grown to become the largest stock exchange in Asia and the third-largest in the world by market capitalization, which stood at RMB 50.6 trillion (US$7.8 trillion) as of September 2021. Stocks (both A-shares and B-shares), bonds, funds, and derivatives are traded on the exchange. The SEE has two trading boards, the Main Board and the Science and Technology Innovation Board, the latter more commonly known as the STAR Market. The Main Board mainly hosts large, well-established Chinese companies and lists both A-shares and B-shares.